package com.mvpandroiddemo.base;

import java.lang.ref.WeakReference;

public class BasePresenter<T extends IBaseView> {

    protected WeakReference<T> baseView;


    public void attachView(T iBaseView) {
        baseView = new WeakReference<>(iBaseView);
    }

    public void detachView() {
        if (baseView != null) {
            baseView.clear();
        }
    }
}
